package com.cleaningcloud.cld.service.impl.mini;

import com.cleaningcloud.cld.domain.vo.CldTrainPlanVo;
import com.cleaningcloud.cld.domain.vo.CldTrainReceiveVo;
import com.cleaningcloud.cld.domain.vo.CldWorkplanVo;
import com.cleaningcloud.cld.mapper.CldStaffMapper;
import com.cleaningcloud.cld.mapper.mini.MiniTrainPlanMapper;
import com.cleaningcloud.cld.service.mini.IMiniTrainPlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * packageName com.cleaningcloud.cld.service.impl.mini
 *
 * @author Shaw
 * @version JDK 8
 * @className MiniTrainPlanServiceImpl
 * @date 2025-06-12
 * @description 小程序-培训计划
 */
@Service
public class MiniTrainPlanServiceImpl implements IMiniTrainPlanService {

    @Autowired
    private MiniTrainPlanMapper miniTrainPlanMapper;

    /**
     * @Author Shaw
     * @Description 小程序(客户端)-查看培训计划列表
     * @date: 2025-06-12 16:27
     * @param: //TODO
     */
    @Override
    public List<CldTrainPlanVo> getCustomerWorkPlanInfo(CldTrainPlanVo cldTrainPlanVo){
        return miniTrainPlanMapper.getTrainPlanList(cldTrainPlanVo);
    }

    /**
     * @Author Shaw
     * @Description 小程序(客户端)-获取培训计划详情
     * @date: 2025-06-12 16:27
     * @param: //TODO
     */
    @Override
    public CldTrainPlanVo getTrainPlanInfo(Long trainPlanId){
        List<CldTrainReceiveVo>  ctrvList = miniTrainPlanMapper.getTrainReceiveInfo(trainPlanId);
        CldTrainPlanVo ctpv = miniTrainPlanMapper.getTrainPlanInfo(trainPlanId);
        ctpv.setTraineesList(ctrvList);
        return ctpv;
    }
}